package com.easylinkin.sm.entity;

import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Transient;
import lombok.Data;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import site.morn.boot.data.entity.ReviserEntity;
import site.morn.data.Displayable;

/**
 * 意见反馈实体
 *
 * @author yezhihao
 * @since develop,2019/8/19
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@FieldNameConstants
@Table(name = "sm_feedback")
@AttributeOverride(name = "modifier", column = @Column(name = "modifier_", length = 32))
@AttributeOverride(name = "modifyTime", column = @Column(name = "modify_time_"))
@AttributeOverride(name = "creator", column = @Column(name = "creator_", length = 32))
@AttributeOverride(name = "createTime", column = @Column(name = "create_time_"))
public class Feedback extends ReviserEntity implements Displayable {

  @Id
  @GeneratedValue
  @ApiModelProperty("意见反馈id")
  @Column(name = "feedback_id_")
  private Long id;

  @ApiModelProperty("客户ID")
  @Column(name = "customer_id_")
  private Long customerId;

  @ApiModelProperty("反馈信息")
  @Lob
  @Basic(fetch=FetchType.LAZY)
  @Column(name = "feedback_information_")
  private String feedbackInformation;

  /**
   * 开始时间
   */
  @Transient
  private Date beginTime;

  /**
   * 结束时间
   */
  @Transient
  private Date endTime;

  /**
   * 显示状态
   */
  @Column(name = "display_")
  private Boolean display;

}
